﻿/*
 * 文件名：JobInfo.cs
 * 类名：XHCTMS.DAL.JobInfo
 * 创建人：仇祖萍
 * 创建时间：2013-05-20
 * 备注：
 * 
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace XHCTMS.BLL
{
    /// <summary>
    /// 职位信息
    /// </summary>
    public class JobInfo
    {
        /// <summary>
        /// 增加职位信息
        /// </summary>
        public int Add(MODEL.JobInfo job)
        {
            return new DAL.JobInfo().AddJobInfo(job);
        }

        /// <summary>
        /// 删除职位信息
        /// </summary>
        public int Delete(byte jobFlag)
        {
            return new DAL.JobInfo().DeleteJobInfo(jobFlag);
        }

        /// <summary>
        /// 修改职位信息
        /// </summary>
        public int Update(MODEL.JobInfo job)
        {
            return new DAL.JobInfo().Update(job);
        }

        /// <summary>
        /// 查询所有职位信息
        /// </summary>
        public DataTable View()
        {
            return new DAL.JobInfo().ViewJobIsusing();
        }

        /// <summary>
        /// 多条件查询
        /// </summary>
        /// <param name="login"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        public DataTable SelecteBy(MODEL.JobInfo job)
        {
            return new DAL.JobInfo().ViewBy(job);
        }

        /// <summary>
        /// 修改职位状态 1/存在, 0/不存在
        /// </summary>
        /// <param name="jobId">职位编号</param>
        /// <param name="IsUsing">职位状态 1/存在, 0/不存在</param>
        /// <returns>返回int类型 1/成功, 0/失败, -1/异常</returns>
        public int AlterFlag(int jobId)
        {
            return new DAL.JobInfo().AlterFlag(jobId,0);
        }

        public DataTable ById(MODEL.JobInfo job)
        {
            return new DAL.JobInfo().ViewById(job);
        }
    }
}
